package com.linkq.ipinyin.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Transient;
import java.util.Date;
import java.util.List;

/**
 * @FileName BcExcutionPlan
 * @Description 执行计划表
 * @Author wangpeng
 * @date 2025-01-01
 **/

@Data
@TableName("t_execution_plan")
public class ExecutionPlan extends Model<ExecutionPlan> {

    @TableId(value = "id", type = IdType.AUTO)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;

    /**
     * 计划id
     */
    private Integer planId;

    /**
     * 执行顺序
     */
    private Integer sort;

    /**
     * 计划开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date planStartTime;

    /**
     * 计划结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date planEndTime;

    /**
     * 修正执行开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date correctStartTime;

    /**
     * 修正执行结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date correctEndTime;

    /**
     * 学习内容（关联课文id，多个以逗号分隔）
     */
    private String studyContent;

    /**
     * 执行开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date executeStartTime;

    /**
     * 执行结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date executeEndTime;

    /**
     * 执行状态 0：未开始 1：进行中 2：已结束
     */
    private Integer status;

    @Transient
    @TableField(exist = false)
    private List<PopQuiz> popQuizList;

    @Transient
    @TableField(exist = false)
    private List<CnCharacter> characterList;
}
